import request from '@/utils/request'

// 获取部门列表
export const getDeptListAPI = () => {
  return request({
    method: 'get',
    url: '/company/department'
  })
}

export const delDeptAPI = (deptId) => {
  return request({
    method: 'delete',
    url: `/company/department/${deptId}`
  })
}

// 获取部门负责人列表
export const getManagerListAPI = () => {
  return request({
    method: 'get',
    url: '/sys/user/simple'
  })
}
//
export const addDeptAPI = (deptForm) => {
  return request({
    method: 'post',
    url: '/company/department',
    data: deptForm
  })
}
export const getDeptDetailAPI = (deptId) => {
  return request({
    method: 'get',
    url: `/company/department/${deptId}`

  })
}
export const editDeptAPI = (deptForm) => {
  return request({
    method: 'put',
    url: `/company/department/${deptForm.id}`,
    data: deptForm
  })
}
